/***************************************************************************
 *   Copyright (C) 2007 by Marcin Swiechowicz   *
 *   marcin.swiechowicz@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KDCJOB_H
#define KDCJOB_H

#include <QMap>

#include <KJob>

class KDCJob: public KJob
{
Q_OBJECT
public:
	KDCJob( QObject *parent = 0 );
	virtual ~KDCJob();
	void setStartupMessage( const QString& info );
	void setEndingMessage( const QString& info );
	void setStandardErrorMessage( int code = 0 );
	virtual int count() const;
	void setTotalSize( qulonglong size );
	void resetErrors();
signals:
	void jobProgram( const QString& );
protected:
	void setFlag( int id, bool flag );
	bool flag( int id );
	void resetFlags();
	QString startupMessage() const;
	QString endingMessage() const;
private:
	QMap<int, bool> p_flags;
	QString p_startMessage;
	QString p_endMessage;
};
#endif
